Platform Explorer / Nuxeo Platform 2021.51

Extension point config

Documentation

Configure the library app

Contribution Descriptors

  • Class: org.nuxeo.salesforce.config.LibraryAppConfigDescriptor
  • Class: org.nuxeo.salesforce.config.DocListAppConfigDescriptor
  • Class: org.nuxeo.salesforce.config.SearchAppConfigDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-salesforce-core-2021.2.0.jar /OSGI-INF/SalesforceComponent.xml
    <extension point="config" target="org.nuxeo.salesforce.SalesforceComponent">
          <library>
            <!-- title>Nuxeo Library</title -->
          	<root>/default-domain/workspaces</root>
          	<nuxeo-drive>true</nuxeo-drive>
          	<!-- 
          	you can control the visibility of these columns: type, size, author, lastModified.
          	The default is to hide the type column. 
          	-->
          	<doclist-hidden-columns>type</doclist-hidden-columns>
          	<!--
          	You can control which doc tab, data section, doc action or nav actions are visible. 
          	If not specified or empty all items are visible:
          	<doc-tabs>preview,data,history</doc-tabs>  
          	<data-sections>metadata,business-metadata,attachments,renditions,mlt</data-sections>
          	<doc-actions>edit,open,download,upload,lock</doc-actions>
          	<nav-actions>download,open,edit,delete</nav-actions>
          	The custom nav. actions are added to the built-in nav-actions. You should define a label, a Salesforce icon ID 
          	and an operation to be invoked bny the action 
          	<custom-nav-actions>
          		<action name='myaction' label="My Action" icon="action:new_note" operation="Salesforce.MyAction" />
          		...
          	</custom-nav-actions>
          	
          	To add custom user fields:
            <user-fields>NuxeoUserId__c,Team__c</user-fields>
            
            You can change the default open action to open the document in nuxeo:
            (The default is to open the document in the document viewer on the right of the listing.)   
            <open-doc-in-nuxeo>true</open-doc-in-nuxeo>
            
          	<preview>
          	function(doc) {
          		// the doc object is an instance of the FileDoc class from force-app/main/default/lwc/nuxeoClient/model.js
          		// the doc.doc object is the Nuxeo document defined in nuxeo javascript client.
          		// Refer to FileDoc for more on the API it expose.
          		// You can return null (or falsy) to let the client use the default rendition detection.         		
          		return {
          			viewer: "video" | "audio" | "image" | "pdf" | "html" | "text" | "binary",
          			rendition: renditionId
          			content: xpath
          			type: mime-type // optional mime type - must be specified for videos.
          		}
          	}
          	</preview>
          	 -->
          </library>
          <listing>
            <!-- title>Nuxeo Documents</title -->
          	<nuxeo-drive>true</nuxeo-drive>      	
          	<upload>true</upload>
          	<link-operation>Salesforce.LinkAsSource</link-operation>
          	<link-test>
          	function(doc, recordId) {
                var source = doc.properties['dc:source'];
                return source ? source === recordId || source.split(',').indexOf(recordId) &gt; -1 : false;
          	}
          	</link-test>
          	<!--
          	The query element defines a custom javascript function to be used by the client to create the search call 
          	for the listing and listing search requests.    
          	The context object describe the client context and can be used to compute the page provider or other parameters
          	to pass to the search. The context object contains the following properties: repositoryName, appType, appConfig, 
          	recordId, recordType, record and env. The **env** property is a custom environment object 
          	that can be defined by external components. (by default it is an empty object)
          	
          	Note that we wrap the recordId inside % characters - to be able to use the LIKE operator in the fixed part of the sfdc_linked_docs page provider     
          	 -->
          	<query>
          	function(context, params) {
          		params.pageProvider = "sfdc_linked_docs";
          		params.recordId = '%'+context.recordId+'%';
          	}
          	</query>
          	<!-- 
          	you can control the visibility of these columns: type, size, author, lastModified.
          	The default is to hide the type column. 
          	-->
          	<doclist-hidden-columns>type</doclist-hidden-columns>      	
          </listing>
          <search>
            <!--  title>Nuxeo Search</title -->
            <nuxeo-drive>true</nuxeo-drive>
          	<page-provider>default_search</page-provider>
          </search>
      </extension>